<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8"/>
    <title>会员管理 - 会员查看</title>
    <?php include($this->c['_homes']['_viewsHome'] . '/_global/_head.php'); ?>
    <link rel="stylesheet" type="text/css" href="/style/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
</head>
<!-- BEGIN BODY -->
<body class="page-header-fixed page-sidebar-fixed">
<!-- BEGIN HEADER -->
<?php include($this->c['_homes']['_viewsHome'] . '/_global/head.php'); ?>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <!-- BEGIN HORIZONTAL MENU PAGE SIDEBAR1 -->
    <?php include($this->c['_homes']['_viewsHome'] . '/_global/menu.php'); ?>
    <!-- END BEGIN HORIZONTAL MENU PAGE SIDEBAR -->
    <!-- BEGIN PAGE -->
    <div class="page-content">
        <!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
        <div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
             aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                        <h4 class="modal-title">Modal title</h4>
                    </div>
                    <div class="modal-body">
                        Widget settings form goes here
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn blue submit_btn">确定</button>
                        <button type="button" class="btn default" data-dismiss="modal">取消</button>
                    </div>
                </div>
                <!-- /.modal-content -->
            </div>
            <!-- /.modal-dialog -->
        </div>
        <!-- /.modal -->
        <!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
        <!-- BEGIN PAGE HEADER-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title"> 会员查看 </h3>
                <ul class="page-breadcrumb breadcrumb">
                    <li><i class="icon-home"></i> <a href="/manage">后台</a> <i class="icon-angle-right"></i></li>
                    <li> 会员管理 <i class="icon-angle-right"></i></li>
                    <li>会员查看</li>
                </ul>
                <!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <div class="portlet box">
                    <div class="booking-search">
                        <form action="" role="form" method="get" id="forms">
                          <div class="row form-group">
                            <div class="col-md-4">                  
                            <div class="input-cont">
                              <h4>直接推荐加盟仓 （<?=$this->data['my_direct_num']?>份）</h4>
                            </div>
                          </div>
                          <div class="col-md-4">                  
                            <div class="input-cont">
                              <h4>团队加盟仓（<?=$this->data['team_num']?>份）</h4>
                            </div>
                          </div>
                          <div class="col-md-4">                  
                            <div class="input-cont">
                              <h4>团队累计业绩小记（<?=$this->data['team_money']?>）</h4>
                            </div>
                          </div>
                          </div>
                          <div class="row form-group">
                            <div class="col-md-3">                  
                            <div class="input-cont">
                              <h4>新增注册业绩（<span id="_total_money">0</span>）</h4>
                            </div>
                          </div>
                            <div class="col-md-3">
                              <div class="input-group date form_datetime" data-date="<?=date("Y-m-d\TH:i\Z");?>">
                            <input type="text" size="16" name="start_time" placeholder="选择开始时间" id="start_time" value="<?=$_GET['start_time']?>" readonly class="form-control">
                            <span class="input-group-btn">
                            <button class="btn default date-reset" type="button"><i class="icon-remove"></i></button>
                            </span> <span class="input-group-btn">
                            <button class="btn default date-set" type="button"><i class="icon-calendar"></i></button>
                            </span> </div>
                  </div>
                  <div class="col-md-3">
                    <div class="input-group date form_datetime" data-date="<?=date("Y-m-d\TH:i\Z");?>">
                            <input type="text" size="16" name="end_time" placeholder="选择结束时间" id="end_time" value="<?=$_GET['end_time']?>" readonly class="form-control">
                            <span class="input-group-btn">
                            <button class="btn default date-reset" type="button"><i class="icon-remove"></i></button>
                            </span> <span class="input-group-btn">
                            <button class="btn default date-set" type="button"><i class="icon-calendar"></i></button>
                            </span> </div>
                  </div>
                   <div class="col-md-1"><input type="button" class="btn blue btn-block" value="搜索" onClick="_seek();"></div> 
                          </div>

                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- END PAGE CONTENT-->
    </div>
    <!-- END PAGE -->
</div>
<!-- END CONTAINER -->
<!-- END CONTAINER -->

<?php include($this->c['_homes']['_viewsHome'] . '/_global/_footer.php'); ?>
<script type="text/javascript" src="/style/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script> 
<script type="text/javascript" src="/style/assets/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script>
jQuery(document).ready(function() {    
   App.init();
   handleDatetimePicker();
   if (jQuery().datepicker) {
       $('.date-picker').datepicker({
           rtl: App.isRTL(),
           autoclose: true
       });
       $('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
     }
   jQuery('#_checkboxall').change(function () {
    var checked = jQuery(this).is(":checked");
    jQuery("._checkboxs").each(function () {
      if (checked) {
        $(this).attr("checked", true);
      } else {
        $(this).attr("checked", false);
      }
      $(this).parents('tr').toggleClass("active");
    });
    jQuery.uniform.update("._checkboxs");
  });
  
  $("._checkboxs").change(function() {
    var checked = jQuery(this).is(":checked");
    if (!checked) {     
      $(this).attr("checked", false);
      $(this).parents('tr').removeClass("active");
      $("#_checkboxall").attr("checked",false);
      jQuery.uniform.update("#_checkboxall");
    }
  });
});

var handleDatetimePicker = function () {
    $(".form_datetime").datetimepicker({
      language:'zh-CN',
      autoclose: true,
      format: "yyyy-mm-dd hh:ii"
    }); 
    $('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
  }
function _export_action(){
  $("#_dataid").prop("value",_dataid);
  $("#_frm").submit();
}


function _seek(){
  if($('#start_time').val()==""){
    alert("开始时间不能为空");
    return false;
  }

  if($('#end_time').val()==""){
    alert("结束时间不能为空");
    return false;
  }
     $.ajax({
     type: "POST",
     url: "ajax",
     data:$("#forms").serialize()+"&act=seek",
     dataType: "json",
     success: function(data) {
      
       if(data > 0){
         $('#_total_money').html(data);
         }else{
           $('#_total_money').html(0);
         }
     }
    }); 
}
</script> 
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>